package com.company;

import java.util.Scanner;

/*
 Program to compute area of a circle.
 */

public class CircleCalculation                              //计算圆面积的程序。
{
    public static void main(String[] args)
    {
        double radius; //in inches                     英寸
        double area;   //in square inches           平方英尺
        Scanner keyboard = new Scanner(System.in);

        System.out.println("Enter the radius of a circle in inches:");
        radius = keyboard.nextDouble( );                //双浮点数
        area = 3.14159 * radius * radius;
        System.out.println("A circle of radius " + radius + " inches");
        System.out.println("has an area of " + area + " square inches.");
    }
}
